import { redirect } from 'react-router-dom'
import { fakeAuthProvider } from '../../router/auth'

async function loader() {
  if (fakeAuthProvider.isAuthenticated) {
    return redirect('/')
  }
  return null
}

export default loader
